package com.akillitavsiye.datastore;

import com.akillitavsiye.User;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

public class DatastoreManager {
	
	private static final DatastoreManager instance = new DatastoreManager();
	 
    private DatastoreManager() {}
 
    public static DatastoreManager getInstance() {
        return instance;
    }

	public void put(User user){
		Key key = KeyFactory.createKey("User", "deneme");
		Entity entity = new Entity("UserEntity", key);
		entity.setProperty("user", user);
		
		DatastoreService datastoreService = DatastoreServiceFactory.getDatastoreService();
		datastoreService.put(entity);
	}

	public void get(){
		
	}
}
